package com.wlb.address.split.dict.defualt;

public class WordData {
	private int nPOS;  //词性   ---在字典文件中，该字段为unsigned short int
	private int nFreq;  //词频  ---在字典文件中该字为unsigned short int
	private int nTermID; //词条ID ---在字典文件中该字段为 unsigned int
	
	
	public WordData(){
		this.nPOS = 0;
		this.nFreq = 0;
		this.nTermID = 0;
	}
	
	public WordData(int pos,int freq,int termID){
		this.nPOS = pos;
		this.nFreq = freq;
		this.nTermID = termID;
	}
	
	
	public int getnPOS() {
		return nPOS;
	}
	public void setnPOS(int nPOS) {
		this.nPOS = nPOS;
	}
	public int getnFreq() {
		return nFreq;
	}
	public void setnFreq(int nFreq) {
		this.nFreq = nFreq;
	}
	public int getnTermID() {
		return nTermID;
	}
	public void setnTermID(int nTermID) {
		this.nTermID = nTermID;
	}

	@Override
	public boolean equals(Object worddata) {
		// TODO Auto-generated method stub
		if(!(worddata instanceof WordData)){
			return false;
		}
		
		WordData wd = (WordData)worddata;
		return ((this.nPOS==wd.nPOS) && (this.nFreq==wd.nFreq) && (this.nTermID==wd.nTermID));
	}
	
	
	
}
